<template>
  <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
    <h3 class="fly-panel-title">回贴周榜</h3>
    <dl>
      <!-- <i class="layui-icon fly-loading">&#xe63d;</i> -->
      <dd v-for="item in list" :key="item.id">
        <a :href="item.link">
          <img :src="item.user.pic"/>
          <cite>{{ item.user.name }}</cite>
          <i>{{ item.answer }}次回答</i>
        </a>
      </dd>
    </dl>
  </div>
</template>

<script>
import { getTop } from '@/api/comtent'
export default {
  name: 'reply-weekly',
  data () {
    return {
      list: []
    }
  },
  created () {
    this._getTop()
  },
  methods: {
    _getTop () {
      getTop().then((result) => {
        if (result.code === 200) {
          this.list = result.data
        }
      }).catch((err) => {
        console.log(err)
      })
    }
  }
}
</script>
